package com.qys.livesMall.financial.model.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serial;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 线上理财表
 * </p>
 *
 * @author
 * @since 2023-06-13
 */
@Getter
@Setter
@TableName("h2_financial_online")
@Schema(name = "FinancialOnline", description = "线上理财表")
public class FinancialOnline implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    @Schema(description = "线上理财id")
    @TableId(value = "id")
    private Long id;

    @Schema(description = "理财名")
    private String name;

    @Schema(description = "封面图")
    private String cover;

    @Schema(description = "最大金额")
    private BigDecimal maxAmount;

    @Schema(description = "利率")
    private BigDecimal interestRate;

    @Schema(description = "收益周期（天数）")
    private Integer period;

    @Schema(description = "状态  0：下架  1：上架")
    private Byte status;

    @Schema(description = "是否被删除 0 未删除 1 已删除")
    @TableLogic
    private Byte deleted;

    @Schema(description = "创建者")
    private String createBy;

    @Schema(description = "创建时间")
    private LocalDateTime createTime;

    @Schema(description = "更新时间")
    private LocalDateTime updateTime;

    @Schema(description = "更新者")
    private String updateBy;

    @Schema(description = "合同模板编码")
    private String contractTemplateCode;

    @Schema(description = "限制用户等级")
    private Integer limitUserLevel;

    @Schema(description = "开始时间")
    private LocalDateTime startTime;

    @Schema(description = "周期结束时间")
    private LocalDateTime finishTime;

    @Schema(description ="模拟购买人数")
    private Integer buyUser;

    @Schema(description ="实际+模拟允许总人数")
    private Integer dummyUser;

    @Schema(description ="实际购买人数")
    private Integer realityCount;
}
